import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
const router = new Router({
    mode: "history",
    routes: [
        {
            path: "/",
            redirect: "/main",
            component: () => import("../layouts/index"),
            children: [
                {
                    path: '/main',
                    component: () => import("../views/main/index")
                },
                {
                    path: '/cate',
                    component: () => import("../views/cate/index")
                },
                {
                    path: '/street',
                    component: () => import("../views/street/index")
                },
                {
                    path: '/cart',
                    component: () => import("../views/cart/index")
                },
                {
                    path: '/mine',
                    component: () => import("../views/mine/index")
                }
            ],
        },
        {
            path: "/main/search",
            component: () => import("../views/main/search"),
        },
        {
            path: "/goods/search-list",
            component: () => import("../views/goods/search_list/index"),
        },
        {
            path: "/activity/sec-kill/index",
            component: () => import("../views/activity/sec_kill/index"),
        },
        {
            path: "/activity/sec-kill/detail",
            component: () => import("../views/activity/sec_kill/detail"),
        },
        {
            path: "/activity/sec-kill/checkout",
            component: () => import("../views/activity/sec_kill/checkout"),
        },
        {
            path: "/activity/sec-kill/pay",
            component: () => import("../views/activity/sec_kill/pay"),
        },
        {
            path: "/address/list",
            component: () => import("../views/address/list"),
        },
        {
            path: "/address/edit/:id",
            component: () => import("../views/address/edit"),
        },
        {
            path: "/mine/pay-password",
            component: () => import("../views/mine/pay_password"),
        },
        {
            path: "/mine/sign-in",
            component: () => import("../views/mine/sign_in"),
        },
        {
            path: "/activity/fight-group/index",
            component: () => import("../views/activity/fight_group/index"),
        },
        {
            path: "/activity/group-buy/index",
            component: () => import("../views/activity/group_buy/index"),
        },
        {
            path: '/mine/profile',
            component: () => import("../views/mine/profile/index")
        },
        {
            path: '/mine/coupon',
            component: () => import("../views/mine/coupon")
        },
        {
            path: '/mine/member-level',
            component: () => import("../views/mine/member_level")
        },
        {
            path: '/order/index',
            component: () => import("../views/order/index")
        },
        {
            path: '/order/detail/:id',
            component: () => import("../views/order/detail")
        }
    ]
})
export default router
